package io.chenglicun.modules.clc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.chenglicun.common.service.impl.CrudServiceImpl;
import io.chenglicun.common.constant.Constant;
import io.chenglicun.modules.clc.dao.ClcAreaInfoDao;
import io.chenglicun.modules.clc.dto.ClcAreaInfoDTO;
import io.chenglicun.modules.clc.entity.ClcAreaInfoEntity;
import io.chenglicun.modules.clc.service.ClcAreaInfoService;
import io.chenglicun.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 区域信息维护
 *
 * @author pipi 1151485299@qq.com
 * @since 1.0 2024-03-01
 */
@Service
public class ClcAreaInfoServiceImpl extends CrudServiceImpl<ClcAreaInfoDao, ClcAreaInfoEntity, ClcAreaInfoDTO> implements ClcAreaInfoService {

    @Override
    public QueryWrapper<ClcAreaInfoEntity> getWrapper(Map<String, Object> params){
        QueryWrapper<ClcAreaInfoEntity> wrapper = new QueryWrapper<>();

        String area = (String)params.get("area");
        wrapper.eq(StringUtils.isNotBlank(area), "area", area);

        return wrapper;
    }


}